package tests;

import javax.swing.JFrame;
import javax.swing.JMenuBar;

import explorer.IconMenu;
import explorer.MainPanel;
import explorer.PathLoader;
import explorer.abstractFactory.BluStyleLoader;
import explorer.abstractFactory.ProxyFactoryLoader;
import explorer.abstractFactory.PurpleStyleLoader;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

//		File f= new File("Cartella Prova");
//		File[] contents = f.listFiles();
//		FileLoader folder = new FileLoader(null);
//		File[] contents=folder.listContents();
		
//		System.out.println(contents[0].getAbsolutePath());
//		try {
//			System.err.println(contents[0].getCanonicalPath());
//		} catch (IOException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
		ProxyFactoryLoader style= new ProxyFactoryLoader(new BluStyleLoader());
		JMenuBar menuBar= new JMenuBar();
		menuBar.add(new IconMenu(style));
		JFrame frame= new JFrame();
		MainPanel panel= new MainPanel(new PathLoader(null), style);
//		JScrollPane scrollablePanel=new JScrollPane(panel);
		frame.setTitle("Explorer");
		frame.setSize(500, 500);
		frame.setJMenuBar(menuBar);
		frame.getContentPane().add(panel);
		frame.setVisible(true);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
	}

}
